# -*- encoding:utf-8 -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 5
_modified_time = 1287518687.324564
_template_filename='/Users/joeldunham/old/onlinelinguisticdatabase/templates/derived/file/export.html'
_template_uri='/derived/file/export.html'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
from webhelpers.html import escape
_exports = ['heading']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    # SOURCE LINE 2
    ns = runtime.Namespace(u'exporter', context._clean_inheritance_tokens(), templateuri=u'/base/exporter.html', callables=None, calling_uri=_template_uri, module=None)
    context.namespaces[(__name__, u'exporter')] = ns

def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, u'/base/index.html', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack._push_frame()
    try:
        __M_locals = __M_dict_builtin(pageargs=pageargs)
        _import_ns = {}
        _mako_get_namespace(context, u'exporter')._populate(_import_ns, [u'*'])
        url = _import_ns.get('url', context.get('url', UNDEFINED))
        h = _import_ns.get('h', context.get('h', UNDEFINED))
        c = _import_ns.get('c', context.get('c', UNDEFINED))
        __M_writer = context.writer()
        # SOURCE LINE 1
        __M_writer(u'\n')
        # SOURCE LINE 2
        __M_writer(u'\n\n')
        # SOURCE LINE 6
        __M_writer(u'\n\n<p>The button below links to an archived folder containing your Files.</p>\n\n')
        # SOURCE LINE 10
        fileReference = url(controller='file', action='retrieve_temp', path=c.zfileName) 
        
        __M_locals_builtin_stored = __M_locals_builtin()
        __M_locals.update(__M_dict_builtin([(__M_key, __M_locals_builtin_stored[__M_key]) for __M_key in ['fileReference'] if __M_key in __M_locals_builtin_stored]))
        __M_writer(u'\n\n<a href="')
        # SOURCE LINE 12
        __M_writer(escape(fileReference))
        __M_writer(u'" class="buttonLink" title="right-click to download this .zip file">')
        __M_writer(escape(c.zfileName))
        __M_writer(u' (')
        __M_writer(escape(h.pretty_filesize(c.zfileSize)))
        __M_writer(u')</a>   \n\n<p>Contents:</p>\n\n<div class="indentedDiv">\n<table>\n')
        # SOURCE LINE 18
        for fileName in c.fileNames:
            # SOURCE LINE 19
            __M_writer(u' <tr><td>')
            __M_writer(escape(fileName[0]))
            __M_writer(u'</td><td>')
            __M_writer(escape(h.pretty_filesize(fileName[1])))
            __M_writer(u'</td></tr>\n')
            pass
        # SOURCE LINE 21
        __M_writer(u'</table>\n</div>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


def render_heading(context):
    context.caller_stack._push_frame()
    try:
        _import_ns = {}
        _mako_get_namespace(context, u'exporter')._populate(_import_ns, [u'*'])
        __M_writer = context.writer()
        # SOURCE LINE 4
        __M_writer(u'\n    <h1 class="heading">Export All File Search Results</h1>\n')
        return ''
    finally:
        context.caller_stack._pop_frame()


